import java.util.Arrays;

public class ArrayChange{
    public static void main(String[] args){
        int[] array=new int[]{1,2,3,4,5};
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]);
        }
        for(int min=0, max=array.length-1;min<max ;min++,max--){
            int temp=array[min];
            array[min]=array[max];
            array[max]=temp;
        }
        System.out.println();
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]);
        }
        System.out.println();
        System.out.println(Arrays.toString(array));
    }
}